<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="description" content="借贷宝项目过程中质量分析报告">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta property="og:site_name" content="JDB项目过程中质量报告" />
    <meta property="og:type" content="Tools">
    <meta property="og:author" content="chendonga@jiedaibao.com">
    <meta property="og:publisher" content="Wechat@Lomo" />
    <meta property="og:masterEmail" content="lomo@lomo.space" />

    <link rel="shortcut icon" href="./favicon.ico" />
    <link rel="bookmark" href="./favicon.ico" />
    <title>富文本编辑Demo</title>

    <!-- CDN CSS Libraries -->

    <!-- end CDN CSS Libraries -->

    <!-- Vendor CSS Libraries -->
    <link rel="stylesheet" href="./vendor/css/bootstrap.min.css">
    <link rel="stylesheet" href="./vendor/css/imports.css">
    <!-- end Vendor CSS Libraries -->

    <!-- bower:css -->
    <!-- endbower -->

    <!-- build:css -->
    <link rel="stylesheet" href="assets/css/basic.css" media="screen">
    <!-- endbuild -->

</head>

<body class="home">

    <div id="top"></div>

    <!-- Navigation (main menu)
		================================================== -->

    <div class="navbar-wrapper">
        <header class="navbar navbar-default navbar-fixed-top" id="MainMenu">
            <div class="navbar-extra-top clearfix">
                <div class="navbar container-fluid">
                    <ul class="nav navbar-nav navbar-left">
                        <li class="menu-item"><a href="contact.html" target="_self"><i class="fa fa-envelope"></i> Contact Us</a></li>
                        <li class="menu-item"><a href="login.html"><i class="fa fa-sign-in"></i> Sign in</a></li>
                    </ul>
                    <div class="navbar-top-right">
                        <ul class="nav navbar-nav navbar-right">
                            <li><a href="http://client-qatools.jdb-dev.com/" alt="" title="Git"><i class="fa fa-home fa-fw"></i></a></li>
                            <li><a href="http://client-qatools.jdb-dev.com/" alt="" title="ClientHomePage"><i class="fa fa-github fa-fw"></i></a></li>
                            <li><a href="http://client-qatools.jdb-dev.com/JDBToolsPlatform/" alt="" title="JDBToolsPlatform"><i class="fa fa-twitter fa-fw"></i></a></li>
                            <li><a href="http://client-qatools.jdb-dev.com/git/" alt="" title="GitRepository"><i class="fa fa-github-alt fa-fw"></i></a></li>
                        </ul>
                        <form class="navbar-form navbar-right navbar-search" role="search" action="search.html">
                            <div class="form-group">
                                <input type="text" class="form-control" placeholder="输入关键字查看报告">
                            </div>
                            <button type="submit" class="btn btn-default"><span class="fa fa-search"></span></button>
                        </form>
                    </div>
                </div>
            </div>

            <div class="container-fluid" id="navbar-main-container">
                <div class="navbar-header">
                    <a href="./" class="navbar-brand"><img alt="" title="你好厉害" src="assets/images/jdb_blue_logo.png"><span class="sr-only">&nbsp; WOW !</span></a>
                    <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
                </div>


                <nav class="navbar-collapse panel-collapse" id="navbar-main">
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown show-on-hover">
                            <a class="dropdown-toggle" data-toggle="dropdown" href="index.html#">自助编辑<i class="fa fa-edit fa-fw"></i></a>
                            <ul class="dropdown-menu">
                                <li class="dropdown-submenu show-on-hover">
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">介绍</a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">说明</a></li>
                                        <li><a href="#">概述</a></li>
                                        <li><a href="#">本周TODO</a></li>
                                    </ul>
                                </li>
                                <li class="dropdown-submenu show-on-hover">
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">一、研发过程质量</a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">研发过程bug分析</a></li>
                                        <li><a href="#">规模度量</a></li>
                                        <li><a href="#">研发过程中风险</a></li>
                                        <li><a href="#">Todo</a></li>
                                    </ul>
                                </li>
                                <li class="dropdown-submenu show-on-hovered">
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">二、上线维度度量(本月)</a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">发布次数统计</a></li>
                                        <li><a href="#">异常上线及事故分析</a></li>
                                        <li><a href="#">Todo</a></li>
                                    </ul>
                                </li>

                                <li class="divider"></li>

                                <li class="dropdown-submenu show-on-hover">
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">线上质量维度</a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">支付重要操作</a></li>
                                    </ul>
                                </li>
                                <li class="dropdown-submenu show-on-hover">
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">线下支撑质量维度</a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">办公环境事故</a></li>
                                    </ul>
                                </li>
                                <li class="dropdown-submenu show-on-hover">
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">本报告待优化内容</a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">具体优化内容</a></li>
                                    </ul>
                                </li>

                            </ul>
                        </li>

                        <li class="dropdown show-on-hover">
                            <a class="dropdown-toggle" data-toggle="dropdown" href="index.html#">内容补充</a>
                            <ul class="dropdown-menu">
                                <li><a href="destinations-list.html">Adventure <i class="fa fa-pencil-square fa-fw"></i></a></li>
                                <li><a href="destinations-list.html">Beaches</a></li>
                                <li><a href="destinations-list.html">Culture &amp; History</a></li>
                            </ul>
                        </li>

                        <li><a href="./reportlist.html" target="_blank">历史报告</a></li>
                        <li><a href="./reportdetails.html" target="_blank">报告详细</a></li>
                    </ul>
                </nav>
            </div>
            <!-- /.container-fluid -->
        </header>
    </div>
    <!-- /.navbar-wrapper -->


    <!-- Hero Section
		================================================== -->
    <section class="hero hero-overlap">
        <div class="bg-overlay">
            <div class="container">
                <div class="intro-wrap">
                    <h1 class="intro-title">质量分析报告</h1>
                    <div class="intro-text" style="text-indent:2em;"> 借贷宝项目过程中质量分析报告 </div>
                </div>
            </div>
        </div>
    </section>


    <section class="main">
        <div class="container">
            <div class="row">
                <textarea id="eidtorDemo" name="textEditor" class="ckeditor" cols="80" rows="10"></textarea>
            </div>
            <p class="m-t-0"></p>
            <div class="row">
                <div class="col-md-3">
                    <button class="btn btn-default">GetData</button>
                    <!--<input type="button" class="btn btn-info" value="SaveData">-->
                </div>
                <div class="col-md-3">
                    <button class="btn btn-warning">SaveData</button>
                </div>
                <div class="col-md-3">
                    <button class="btn btn-primary">Preview</button>
                </div>
            </div>
            <p class="m-t-0"></p>
            <div class="row">
                <div class="col-md-12 preview">
                </div>
            </div>
        </div>





    </section>

    <!-- Footer
		================================================== -->
    <footer id="footer">
        <section class="top-footer regular">
            <div class="container">
                <div class="row">

                    <h3 class="hidden">More Resources</h3>

                    <div class="col-lg-9">
                        <div class="footer-content-left">

                            <p style="font-size:14px; color:#aaa;">
                                <a href="http://client-qatools.jdb-dev.com/git/JDB">关 于</a> &nbsp; | &nbsp;
                                <a href="login.html">登 录</a> &nbsp; | &nbsp;
                                <a href="./reportlist.html" target="_blank">历史版本下载</a> &nbsp; | &nbsp;
                                <a href="./reportlist.html" target="_blank">所有报告</a> &nbsp; | &nbsp;
                                <a href="contact.html">意见建议</a>
                            </p>

                            <p style="font-size:14px; color: #999; margin-bottom:0;">
                                <strong>This is <a href="http://www.jiedaibao.com" target="_blank">JDB</a> Rearch & Development Process Quality Analysis Platform !</strong>

                                <br>Created by <a href="http://lomo.space" target="_blank">Lomo</a>.
                            </p>

                        </div>
                    </div>

                    <div class="col-lg-3">
                        <div class="footer-content-right">
                            <div style="text-align: right;" class="visible-lg-block">
                                <img src="assets/images/jdb_blue_logo.png" alt="" width="1024" height="565" style="max-width: 175px;">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <section class="sub-footer">
            <div class="container">
                <div class="row">

                    <h3 class="hidden">About</h3>

                    <div class="col-xs-12">
                        <span style="color:#999; font-size: 15px;" class="pull-right">
								<a href="javascript:void(0);" target="_blank" class="text-info" style="text-decoration:none;">
									<strong><i class="fa fa-download"></i> &nbsp; Download It!</strong>
								</a>
							</span>

                        <span style="color:#999; font-size: 13px;">&copy; 2017 JDB | Based On Node/NPM/Gulp/Bower/AngularJS/Jquery/CSS3/HTML5/Bootstrap/PHP .</span>
                    </div>
                </div>
            </div>
        </section>
    </footer>

    <!-- CDN JS Libraries -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <!--<script src="//cdn.bootcss.com/ckeditor/4.6.2/ckeditor.js"></script>-->
    <!-- end CDN JS Libraries -->

    <!-- Vendor JS Libraries -->
    <script src="./vendor/js/bootstrap.min.js"></script>
    <script src="./vendor/js/owl.carousel.min.js"></script>
    <script src="./vendor/js/ckeditor/ckeditor.js"></script>
    <!-- end Vendor JS Libraries -->

    <!-- bower:js -->
    <!--<script src="../bower_components/ckeditor/config.js"></script>-->
    <!-- endbower -->

    <!-- build:js -->

    <script src="assets/js/basic.js"></script>
    <!-- endbuild -->

    <script>
        //获取编辑框内的数据内容。
        //eidtorDemo -- 取textarea里的id属性，而非name属性
        $("button.btn-default").click(function() {
            var data = CKEDITOR.instances.eidtorDemo.getData();
            if (data.length !== 0) {
                alert(data);
            } else {
                alert("无数据！");
            }
        });

        $("button.btn-primary").click(function() {
            var data = CKEDITOR.instances.eidtorDemo.getData();
            if (data.length !== 0) {
                //do preview here
                var e = document.querySelector(".preview");
                //var t = '';
                e.innerHTML = data;
            } else {
                //error tips here
            }
        });

        $(".btn.btn-warning").click(function () {
            var richText = CKEDITOR.instances.eidtorDemo.getData();
            $.ajax({
                url: '../../api/processQualityReport/richEditor.php',
                data: {
                    "richText": richText
                },
                async: true,
                //dataType: 'JSON',
                type: 'POST',
                success: function (res) {
                    alert(res);
                    //console.log(res);
                    document.querySelector(".preview").innerHTML = res;
                },
                error: function (e) {
                    console.log(e.status);
                }

            });
        });
    </script>

</body>

</html>